All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.naming.NamingException

java.lang.Object
   |
   +----java.lang.Throwable
           |
           +----java.lang.Exception
                   |
                   +----java.naming.NamingException

public class NamingException
extends Exception
NamingException is the superclass of all exceptions thrown by operations in the Context interface. The nature of the failure is described by the name of the subclass. This exception captures the information pinpointing where the operation failed, such as where resolution last proceeded to.


Variable Index

 o remainingName
 o resolvedName
 o resolvedObj
 o rootException

Constructor Index

 o NamingException()
Constructs a new NamingException.
 o NamingException(Name, Object, Name)
Constructs a new NamingException.
 o NamingException(Name, Object, Name, String)
Constructs a new NamingException.
 o NamingException(String)
Constructs a new NamingException.

Method Index

 o appendRemainingComponent(String)
Add name as the last component in remaining name.
 o appendRemainingName(Name)
Add components from 'name' as the last components in remaining name.
 o getExplanation()
Retrieves the explanation associated with this exception.
 o getRemainingName()
Retrieves the remaining unresolved portion of the name.
 o getResolvedName()
Retrieves the leading portion of the name that was resolved successfully.
 o getResolvedObj()
Retrieves the object to which resolution was successful.
 o getRootCause(Exception)
Retrieves the root cause of this NamingException, if any.
 o setRemainingName(Name)
Sets the remaining name field of this exception.
 o setResolvedName(Name)
Sets the resolved name field of this exception.
 o setResolvedObj(Object)
Sets the resolved object field of this exception.
 o setRootCause(Throwable)
Records that exception 'e' is the root cause of this NamingException.
 o toString()
Generates the string representation of this exception.
 o toString(boolean)
Generates the string representation in more detail.

Variables

 o resolvedName
 protected Name resolvedName
 o resolvedObj
 protected Object resolvedObj
 o remainingName
 protected Name remainingName
 o rootException
 protected Throwable rootException

Constructors

 o NamingException
 public NamingException(Name resolvedName,
                        Object resolvedObj,
                        Name remainingName,
                        String explanation)
Constructs a new NamingException. null is an acceptable value for any of the parameters.

Parameters:
resolvedName - The part of the name that has been successfully resolved.
resolvedObj - The object to which resolution was successful.
remainingName - The remaining unresolved portion of the name.
explanation - Additional detail about this exception.
 o NamingException
 public NamingException(Name resolvedName,
                        Object resolvedObj,
                        Name remainingName)
Constructs a new NamingException. null is an acceptable value for any of the parameters.

Parameters:
resolvedName - The part of the name that has been successfully resolved.
resolvedObj - The object to which resolution was successful.
remainingName - The remaining unresolved portion of the name.
 o NamingException
 public NamingException(String explanation)
Constructs a new NamingException.

Parameters:
explanation - Additional detail about this exception.
 o NamingException
 public NamingException()
Constructs a new NamingException.

Methods

 o getResolvedName
 public Name getResolvedName()
Retrieves the leading portion of the name that was resolved successfully.

Returns:
The part of the name that was resolved successfully.
See Also:
getResolvedObj, setResolvedName
 o getRemainingName
 public Name getRemainingName()
Retrieves the remaining unresolved portion of the name.

Returns:
The part of the name that has not been resolved.
See Also:
setRemainingName, appendRemainingName, appendRemainingComponent
 o getResolvedObj
 public Object getResolvedObj()
Retrieves the object to which resolution was successful. This is the object to which the resolved name is bound.

Returns:
The object that was resolved so far.
See Also:
getResolvedName, setResolvedObj
 o getExplanation
 public String getExplanation()
Retrieves the explanation associated with this exception.

Returns:
The detail string explaining more about this exception.
See Also:
getMesssage
 o setResolvedName
 public void setResolvedName(Name name)
Sets the resolved name field of this exception.

Parameters:
name - The name to set resolved name to.
See Also:
getResolvedName
 o setRemainingName
 public void setRemainingName(Name name)
Sets the remaining name field of this exception.

Parameters:
name - The name to set remaining name to.
See Also:
getRemainingName, appendRemainingName, appendRemainingComponent
 o setResolvedObj
 public void setResolvedObj(Object obj)
Sets the resolved object field of this exception.

Parameters:
obj - The object to set resolved object to.
See Also:
getResolvedObj
 o appendRemainingComponent
 public void appendRemainingComponent(String name)
Add name as the last component in remaining name.

Parameters:
name - The component to add.
 o appendRemainingName
 public void appendRemainingName(Name name)
Add components from 'name' as the last components in remaining name.

Parameters:
name - The ordered components to add.
 o getRootCause
 public Throwable getRootCause(Exception e)
Retrieves the root cause of this NamingException, if any. The root cause of a naming exception is used when the service provider wants to indicate to the caller a non-naming related exception but at the same time want to use the NamingException structure to indicate how far the naming operation proceeded.

Returns:
The exception that caused this naming exception.
 o setRootCause
 public void setRootCause(Throwable e)
Records that exception 'e' is the root cause of this NamingException.

Parameters:
e - The exception that caused the naming operation to fail.
 o toString
 public String toString()
Generates the string representation of this exception.

Returns:
The string representation of this exception.
Overrides:
toString in class Throwable
 o toString
 public String toString(boolean detail)
Generates the string representation in more detail.

Parameters:
detail - If true, include details about the resolved object in addition to the other information.

All Packages  Class Hierarchy  This Package  Previous  Next  Index